isnan, isnanf, isinf, isinff, finite, finitef[test for exceptional numbers]

Contents|Index|Previous|Next

isnan, isnanf, isinf, isinff, finite, finitef
[test for exceptional numbers]

SYNOPSIS
#include <ieeefp.h>
int isnan(double arg);
int isinf(double arg);
int finite(double arg);
int isnanf(float arg);
int isinff(float arg);
int finitef(float arg);

DESCRIPTION
These functions provide information on the floating point argument supplied.

The following are five major number formats.

- zero
A number which contains all zero bits.
- subnormal
Used to represent number with a zero exponent, but a non-zero fraction.
- normal
A number with an exponent, and a fraction.
- infinity
A number with an all 1’s exponent and a zero fraction.
- NAN
A number with an all 1’s exponent and a non-zero fraction.

RETURNS
isnan returns 1 if the argument is a NaN.

isinf returns 1 if the argument is infinity.

finite returns 1 if the argument is zero, subnormal or normal.

The isnanf, isinff and finitef perform the same operations as their isnan, isinf and finite counterparts, but on single precision floating point numbers.

Top|Contents|Index|Previous|Next